import { GET, POST, POST_JSON,FILE } from '@/utils/http.js'

// 圈子列表
export const getArticleList = (data) => {
    return GET(`/ajax/article/getArticleListByCategoryId`,data)//?page=${page}&limit=${limit}&articleCategoryId=${articleCategoryId}&title=${title}
}

// 头条/圈子 详情
export const getNewsDetails = (data) => {
    return GET(`/ajax/article/getNewsDetails`,data)//?newsId=${newsId}
}

// 新版圈子  获取视频上传地址和凭证
export const createUploadVideo = (data) => {
    return GET(`/aliyun/fileAuth/createUploadVideo`,data)//?fileName=${fileName}&title=${title}
}

// 刷新视频上传凭证
export const refreshUploadVideo = (data) => {
    return GET(`/aliyun/fileAuth/refreshUploadVideo`,data)//?videoId=${videoId}
}

// 获取图片上传地址和凭证
export const createUploadImage = (data) => {
    return GET(`/aliyun/fileAuth/createUploadImage`,data)//?imageType=${imageType}&title=${title}
}

// 发布圈子
export const publishCircle = (data) => {
    return POST_JSON(`/shopCircle/publishCircle`,data,true)
}

// 圈子列表
export const getNewCircleList = (data) => {
    return POST_JSON(`/shopCircle/getCircleList`,data)
}

// 圈子点赞
export const addCommend = (data) => {
    return POST_JSON(`/shopCommend/addCommend`,data)
}

// 圈子详情
export const getCircleDetail = (data) => {
    return POST_JSON(`/shopCircle/getCircleDetail`,data)
}

// 圈子详情的评论列表
export const getCircleDiscussList = (data) => {
    return POST_JSON(`/shopCircle/getCircleDiscussList`,data)
}

// 发表圈子评论
export const discussCircle = (data) => {
    return POST_JSON(`/shopDiscuss/discussCircle`,data)
}

// 我的动态
export const getMyCircleList = (data) => {
    return POST_JSON(`/shopCircle/getMyCircleList`,data)
}

// 删除我的动态
export const delCircle = (data) => {
    return GET(`/shopCircle/delCircle`,data)//?circleId=${circleId}&openid=${openid}&userId=${userId}
}

// 我的评论
export const getDiscussList = (data) => {
    return POST_JSON(`/shopDiscuss/getDiscussList`,data)
}

// 删除我的评论
export const delDiscuss = (data) => {
    return GET(`/shopDiscuss/delDiscuss`,data)//?discussId=${discussId}&openid=${openid}&userId=${userId}
}

// 微信配置 -- 获取config
export const wxConfig = (data) => {
    return POST_JSON(`/WeChat/config`,data)
}

// 圈子转发次数
export const addForwardCount = (data) => {
    return GET(`/shopCircle/addForwardCount`,data)//?circleId=${circleId}
}

// 视频播放次数
export const addPlayCount = (data) => {
    return GET(`/shopCircle/addPlayCount`,data)//?circleId=${circleId}
}